<?php
/**
 * 分类
 */
namespace app\api\controller;

use app\common\controller\Api;
use think\Db;

class Category extends Api {
	
	protected $noNeedLogin = ['recommend'];
	
	/**
	 * 推荐分类
	 */
	public function recommend(){
		$rows = Db::name('goodsCategory')->order(['sort' => 'asc'])
			->field('id, name, image, link_type, link_url')
			->order(['sort' => 'asc'])
			->select();
		
		$this->success(__('Select success'), $rows);
	}
}
